home *** CD-ROM | disk | FTP | other *** search
- Figure 4: Simple Pascal Procedure
-
- procedure Initialize;
- { Initialize the video mode, LastCol, LastRow, and the random number }
- { generator. Paint the help line. }
- begin
- CheckBreak:=False; { turn off Contrl-C checking }
- OrigMode:=LastMode; { Remember original video mode }
- TextMode(Lo(LastMode)+Font8x8); { use 43 or 50 lines on EGA/VGA }
- LastCol:=Lo(WindMax)+1; { get last column, row }
- LastRow:=Hi(WindMax)+1;
- GoToXY(1,LastRow); { put message line on screen }
- TextBackground(Black);
- TextColor(White);
- Write(' Ins-InsLine ',
- 'Del-DelLine ',
- #27#24#25#26'-Cursor ',
- 'Alt-W-Window ',
- 'Alt-R-Random ',
- 'Esc-Exit');
- Dec(LastRow,80 div LastCol); { don't write on message line }
- Randomize; { init random number generator }
- end; { Init }
-